package chapter5;
import java.util.Scanner;
/****************************************************************
 * Author：icynlau
 * Description: 对大写字母
 * Date:2021/4/4
 * ***************************************************************
 */
public class exc5_50 {
	public static void main(String[] args) {
		Scanner input=new Scanner(System.in);
		
		System.out.print("Enter a string: ");
		String s=input.nextLine();
		int sum=0;
		for(int i=0;i<s.length();i++) {
			char tmp=s.charAt(i);
			
			if(tmp>='A'&&tmp<='Z') {
				sum++;
			}
			
		}
		
		System.out.print("The number of uppercase letters is "+sum);
		
	}

}
